<!doctype html>
<%@ page language="java" pageEncoding="UTF-8"%>
<html>
<head>
    <%@ include file="/WEB-INF/views-jsp/include/taglib/taglib.jsp" %>
    <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
    <%@ include file="/WEB-INF/views-jsp/include/link/link.jsp" %>
    <%@ include file="/WEB-INF/views-jsp/include/script/script.jsp" %>
    <link rel="stylesheet" type="text/css" href="${path}/html/js/js-resource/imgPreview/css/style.css"/>
    <link rel="stylesheet" type="text/css" href="${path}/html/js/js-jsp/custom/dyActiveTable/css/dyActiveTable.css" />
    <script type="text/javascript" src="${path}/html/js/js-jsp/layout-goback.js"></script>
    <script type="text/javascript" src="${path}/html/js/js-resource/imgPreview/js/lightBox.js"></script>
    <script type="text/javascript" src="${path}/html/js/js-jsp/st/purchaseFile/purchaseFileDesc.js?v=<%out.print(Math.random());%>"></script>
    <script type="text/javascript" src="${path}/html/js/js-jsp/st/purchaseDetail/purchaseDetailDesc.js?v=<%out.print(Math.random());%>"></script>
    <script type="text/javascript" src="${path}/html/js/js-jsp/custom/dyActiveTable/js/dyActiveTable.js"></script>
    <script>
        var purchaseDetailList = ${purchaseDetailList};
    </script>
</head>
<body>
<div class="place">
    <span>当前位置：</span>
    <ul class="placeul">
        <li><a url="${path}/purchaseApply/index.do" iconCls="${param.iconCls}" closable="true">采购申请</a></li>
        <li><a >采购申请详情</a></li>
    </ul>
</div>
<div class="descBox">
    <div class="formtitle"><span>采购申请信息</span></div>
    <table id="purchaseApplyDesc" align="center" width="100%" >
        <input type="hidden" id="fileName" name="fileName" value="${requestScope.purchaseFile.commonFile.name}" />
        <tr>
            <td><span>项目名称：</span></td>
            <td><span>${requestScope.purchaseApply.project.prName}</span></td>
            <td><span>合同编号：</span></td>
            <td><span>${requestScope.purchaseApply.contract.coNumber}</span></td>
        </tr>
        <tr>
            <td><span>合同名称：</span></td>
            <td><span>${requestScope.purchaseApply.contract.coName}</span></td>
            <td><span>请购日期：</span></td>
            <td><span>${requestScope.purchaseApply.purDate}</span></td>
        </tr>
        <tr>
            <td><span>合同单号：</span></td>
            <td><span>${requestScope.purchaseApply.contract.coCode}</span></td>
            <td><span>采购单号：</span></td>
            <td><span>${requestScope.purchaseApply.purCode}</span></td>
        </tr>
        <tr>
            <td><span>上报状态：</span></td>
            <td><span>
                <c:if test="${requestScope.purchaseApply.reportState ==  1}">
                    未上报
                </c:if>
                <c:if test="${requestScope.purchaseApply.reportState ==  2}">
                    已上报
                </c:if>
            </span></td>
            <td><span>审核状态：</span></td>
            <td><span>
                <c:if test="${requestScope.purchaseApply.checkState == 0}">
                    未审核
                </c:if>
                <c:if test="${requestScope.purchaseApply.checkState == 1}">
                    审核中
                </c:if>
                <c:if test="${requestScope.purchaseApply.checkState == 2}">
                    已通过
                </c:if>
                <c:if test="${requestScope.purchaseApply.checkState == 3}">
                    已驳回
                </c:if>
            </span></td>
        </tr>
        <tr>
            <td><span>请购类别：</span></td>
            <td><span>
                <c:if test="${requestScope.purchaseApply.purType  == 1}">
                    合同内
                </c:if>
                <c:if test="${requestScope.purchaseApply.purType  == 2}">
                    合同外
                </c:if>
            </span></td>
            <td><span>请购人：</span></td>
            <td><span>${requestScope.purchaseApply.purPerson}</span></td>
        </tr>
        <tr>
            <td><span>创建者：</span></td>
            <td><span>${requestScope.purchaseApply.createBy}</span></td>
            <td><span>创建时间：</span></td>
            <td><span><fmt:formatDate value="${requestScope.purchaseApply.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></span></td>
        </tr>
        <tr>
            <td><span>更新者：</span></td>
            <td><span>${requestScope.purchaseApply.updateBy}</span></td>
            <td><span>更新时间：</span></td>
            <td><span><fmt:formatDate value="${requestScope.purchaseApply.createDate}" pattern="yyyy-MM-dd HH:mm:ss"/></span></td>
        </tr>
        <tr>
            <td valign="top"><span>备注信息：</span></td>
            <td><span>${requestScope.purchaseApply.remark}</span></td>
        </tr>
    </table>
    <c:if test="${purchaseDetailList!='[]'}">
        <div class="formtitle"><span>采购申请清单信息</span></div>
        <div id="activeTableForPurchaseDetail" style="width:100%; height:400px; overflow: scroll;"></div>
    </c:if>
    <div class="formtitle"><span>采购附件信息</span></div>
    <table id="attachmentDesc" align="center" width="100%" >
        <tr>
            <td align="right" >附件操作：</td>
            <td align="left">
                <input  type="hidden" name="fileId" id="fileId"  value="${requestScope.purchaseFile.commonFile.fileId}"/>
                <input  type="hidden" name="url" id="url"  value="${requestScope.purchaseFile.commonFile.url}"/>
                <c:if test="${requestScope.purchaseFile.commonFile.url!=null}">
                    <a id="browseBtn" class="easyui-linkbutton"  style="width:60px; height: 28px"> 浏览 </a>
                    <a id="downloadBtn" class="easyui-linkbutton" href="${requestScope.purchaseFile.commonFile.url}"  style="width:60px; height: 28px"> 下载 </a>
                </c:if>
                <c:if test="${requestScope.purchaseFile.commonFile.url}">
                </c:if>
                <c:if test="${requestScope.purchaseFile.commonFile.url==null}">
                    附件未上传
                </c:if>
            </td>
            <td><span>附件名称：</span></td>
            <td><span>${requestScope.purchaseFile.commonFile.name}</span></td>
        </tr>
    </table>
</div>
</body>
<script>
    jQuery(document).ready(function($) {
        $.LightBox({speed:500});
    });
</script>
</html>
